# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements.  See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership.  The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License.  You may obtain a copy of the License at
#
#   http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied.  See the License for the
# specific language governing permissions and limitations
# under the License.

"""
> DO NOT EDIT IT MANUALLY <

This file is generated by opendal/dev/generate/python.rs. `opendal.__base` doesn't exists.
"""

from typing import overload, Literal, TypeAlias

# `true`/`false`` in any case, for example, `true`/`True`/`TRUE` `false`/`False`/`FALSE`
_bool: TypeAlias = str
# a str represent a int, for example, `"10"`/`"0"`
_int: TypeAlias = str

# a human readable duration string
# see https://docs.rs/humantime/latest/humantime/fn.parse_duration.html
# for more details
_duration: TypeAlias = str


# A "," separated string, for example `"127.0.0.1:1,127.0.0.1:2"`
_strings: TypeAlias = str

class _Base:
    """this is not a real base class but typing mixin,

    The services list here is support by opendal pypi wheel.
    """

{% for srv in srvs %}
    @overload
    def __init__(
        self,
        scheme: Literal["{{srv}}"],
        /,
        *,
    {%- for field in srvs[srv].config -%}
        {% if field.deprecated %}
        # deprecated: {{field.deprecated["note"]}}
        {%- endif %}
        {{field.name}}: {{make_python_type(field.value)}}{% if field.optional %} = ...{% endif %},
    {%- endfor %}
    ) -> None: ...
{% endfor %}

    @overload
    def __init__(self, scheme: str, /, **kwargs: str) -> None: ...
